.class public Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;
.super Landroid/widget/BaseAdapter;
.source "WidgetRemoteViewsListAdapter.java"


# instance fields
.field mAppWidgetProvider:Landroid/content/ComponentName;

.field private mContext:Landroid/content/Context;

.field final mHandler:Landroid/os/Handler;

.field private mIntent:Landroid/content/Intent;

.field final mQueryDataRunnable:Ljava/lang/Runnable;

.field private mRemoteViews:Lmobi/intuitit/android/widget/BoundRemoteViews;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/content/Intent;Landroid/content/ComponentName;II)V
    .locals 8
    .parameter "context"
    .parameter "intent"
    .parameter "provider"
    .parameter "appWidgetId"
    .parameter "listViewId"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalArgumentException;
        }
    .end annotation

    .prologue
    .line 39
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 20
    const/4 v0, 0x0

    iput-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mRemoteViews:Lmobi/intuitit/android/widget/BoundRemoteViews;

    .line 56
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mHandler:Landroid/os/Handler;

    .line 58
    new-instance v0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter$1;

    invoke-direct {v0, p0}, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter$1;-><init>(Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;)V

    iput-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mQueryDataRunnable:Ljava/lang/Runnable;

    .line 41
    iput-object p1, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mContext:Landroid/content/Context;

    .line 42
    iput-object p3, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mAppWidgetProvider:Landroid/content/ComponentName;

    .line 43
    iput-object p2, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mIntent:Landroid/content/Intent;

    .line 45
    const-string v0, "mobi.intuitit.android.hpp.EXTRA_ITEM_LAYOUT_REMOTEVIEWS"

    invoke-virtual {p2, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v0

    check-cast v0, Lmobi/intuitit/android/widget/BoundRemoteViews;

    iput-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mRemoteViews:Lmobi/intuitit/android/widget/BoundRemoteViews;

    .line 46
    iget-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    iget-object v1, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mIntent:Landroid/content/Intent;

    const-string v2, "mobi.intuitit.android.hpp.EXTRA_DATA_URI"

    invoke-virtual {v1, v2}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    iget-object v2, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mIntent:Landroid/content/Intent;

    const-string v3, "mobi.intuitit.android.hpp.EXTRA_PROJECTION"

    invoke-virtual {v2, v3}, Landroid/content/Intent;->getStringArrayExtra(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v2

    iget-object v3, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mIntent:Landroid/content/Intent;

    const-string v4, "mobi.intuitit.android.hpp.EXTRA_SELECTION"

    invoke-virtual {v3, v4}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    iget-object v4, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mIntent:Landroid/content/Intent;

    const-string v5, "mobi.intuitit.android.hpp.EXTRA_SELECTION_ARGUMENTS"

    invoke-virtual {v4, v5}, Landroid/content/Intent;->getStringArrayExtra(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v4

    iget-object v5, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mIntent:Landroid/content/Intent;

    const-string v7, "mobi.intuitit.android.hpp.EXTRA_SORT_ORDER"

    invoke-virtual {v5, v7}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    .line 52
    .local v6, cursor:Landroid/database/Cursor;
    iget-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mRemoteViews:Lmobi/intuitit/android/widget/BoundRemoteViews;

    iget-object v1, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v0, v6, v1}, Lmobi/intuitit/android/widget/BoundRemoteViews;->setBindingCursor(Landroid/database/Cursor;Landroid/content/Context;)V

    .line 53
    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    .line 54
    return-void
.end method

.method static synthetic access$000(Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;)Landroid/content/Intent;
    .locals 1
    .parameter "x0"

    .prologue
    .line 18
    iget-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mIntent:Landroid/content/Intent;

    return-object v0
.end method

.method static synthetic access$100(Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;)Landroid/content/Context;
    .locals 1
    .parameter "x0"

    .prologue
    .line 18
    iget-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic access$200(Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;)Lmobi/intuitit/android/widget/BoundRemoteViews;
    .locals 1
    .parameter "x0"

    .prologue
    .line 18
    iget-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mRemoteViews:Lmobi/intuitit/android/widget/BoundRemoteViews;

    return-object v0
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 80
    iget-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mRemoteViews:Lmobi/intuitit/android/widget/BoundRemoteViews;

    invoke-virtual {v0}, Lmobi/intuitit/android/widget/BoundRemoteViews;->getCursorCacheSize()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter "position"

    .prologue
    .line 85
    iget-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mRemoteViews:Lmobi/intuitit/android/widget/BoundRemoteViews;

    invoke-virtual {v0, p1}, Lmobi/intuitit/android/widget/BoundRemoteViews;->moveCursor(I)V

    .line 86
    iget-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mRemoteViews:Lmobi/intuitit/android/widget/BoundRemoteViews;

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 91
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 3
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    .line 96
    iget-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mRemoteViews:Lmobi/intuitit/android/widget/BoundRemoteViews;

    invoke-virtual {v0, p1}, Lmobi/intuitit/android/widget/BoundRemoteViews;->moveCursor(I)V

    .line 97
    if-nez p2, :cond_0

    .line 98
    iget-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mRemoteViews:Lmobi/intuitit/android/widget/BoundRemoteViews;

    iget-object v1, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mContext:Landroid/content/Context;

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Lmobi/intuitit/android/widget/BoundRemoteViews;->apply(Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 101
    :goto_0
    return-object p2

    .line 100
    :cond_0
    iget-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mRemoteViews:Lmobi/intuitit/android/widget/BoundRemoteViews;

    invoke-virtual {v0, p2}, Lmobi/intuitit/android/widget/BoundRemoteViews;->reapplyBinding(Landroid/view/View;)V

    goto :goto_0
.end method

.method public declared-synchronized notifyToRegenerate()V
    .locals 2

    .prologue
    .line 75
    monitor-enter p0

    :try_start_0
    iget-object v0, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lmobi/intuitit/android/widget/WidgetRemoteViewsListAdapter;->mQueryDataRunnable:Ljava/lang/Runnable;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 76
    monitor-exit p0

    return-void

    .line 75
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
